package group.program.mapper;

import group.program.pojo.trafficPojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface RegisterMapper {
    @Insert("insert into user(username, password, full_name, phone_number, email) values(#{user_name}, #{password}, #{full_name}, #{phone_number}, #{email})")
    int register(User user);
    @Select("select * from user where username=#{userName}")
    String isUserNameExist(String userName);
    @Select("select * from user where email=#{email}")
    String isEmailExist(String email);
    @Select("select * from user where phone_number=#{phoneNumber}")
    String isPhoneNumberExist(String phoneNumber);
    @Select("select * from user where full_name=#{fullName}")
    String isFullNameExist(String fullName);
}
